
class Element {
	private int m_key;
	private int m_link;
	private int m_table;
	
	public boolean eq(Element e) {
		if (m_key == e.m_key) return true;
		else return false;
	}
	
	public boolean lt(Element e) {
		if (m_key < e.m_key) return true;
		else return false;
	}
	
	public boolean gt(Element e) {
		if (m_key > e.m_key) return true;
		else return false;
	}
	
	public boolean le(Element e) {
		return !gt(e);
	}
	
	public boolean ge(Element e) {
		return !lt(e);
	}
	
	public void setKey(int key) {
		m_key = key;
	}
	
	public int getKey() {
		return m_key;
	}
	
	public void assign(Element e) {
		m_key = e.m_key;
		m_link = e.m_link;
		m_table = e.m_table;
	}
	
	public void swap(Element e) {
		Element tmp = new Element();
		tmp.assign(this);
		this.assign(e);
		e.assign(tmp);
	}
	
	public void setLink(int link) {
		m_link = link;
	}
	
	public int getLink() {
		return m_link;
	}
	
	public void setTable(int table) {
		m_table = table;
	}
	
	public void setTable(Element e) {
		m_table = e.m_table;
	}
	
	public int getTable() {
		return m_table;
	}
}

class StringElement extends Element {
	
}